<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title></title>
    <link rel="stylesheet" href="{webroot:webapp/build/lib/framework7.min.css}"/>
    <!-- Custom STYLES -->
    <link rel="stylesheet" href="{webroot:webapp/build/css/app.css}?r=<?php echo time();?>">
    <link href="{theme:css/mobiscroll.frame.css}" rel="stylesheet" type="text/css" />
    <link href="{theme:css/mobiscroll.scroller.css}" rel="stylesheet" type="text/css" />
</head>

<body>
    <!-- Status bar overlay for fullscreen mode-->
    <div class="statusbar-overlay"></div>
    <!-- Panels overlay-->
    <div class="panel-overlay"></div>
    <!-- Views-->
    <div class="views tabs toolbar-through">
        <!--商城-->
        <div id="mallView" class="view view-main tab active">
            <!--navbar-->
            <div class="navbar">
            </div>
            <div class="pages navbar-through">
                <div class="page" data-page="mallIndex">
                </div>
            </div>
        </div>
        <!--分类-->
        <div id="classifyView" class="view tab classify-view">
            <!--navbar-->
            <div class="navbar">
            </div>
            <div class="pages navbar-through">
                <div class="page" data-page="classifyIndex">
                </div>
            </div>
        </div>
        <!--=精品-->
        <div id="starView" class="view tab star-view">
            <!--navbar-->
            <div class="navbar">
            </div>
            <div class="pages navbar-through">
                <div class="page" data-page="starIndex">
                </div>
            </div>
        </div>
        <!--我的-->
        <div id="mineView" class="view tab mine-view">
            <!--navbar-->
            <div class="navbar">
            </div>
            <div class="pages navbar-through">
                <div class="page" data-page="mineIndex">
                </div>
            </div>
        </div>
        <!--toolbar-->
        <div id="footerBar" class="toolbar tabbar tabbar-labels">
            <div class="toolbar-inner">
                <a href="#mallView" class="tab-link active"><i class="icon icon-mall"></i><span class="tabbar-label">首页</span></a>
                <a href="#classifyView" class="tab-link"><i class="icon icon-classify"></i><span class="tabbar-label">分类</span></a>
                <a href="#starView" class="tab-link "><i class="icon icon-star"></i><span class="tabbar-label">精品</span></a>
                <a href="#mineView" class="tab-link"><i class="icon icon-mine"></i><span class="tabbar-label">我的</span></a>
            </div>
        </div>
    </div>

    <!-- SCRIPTS -->
    <script>
    //wechat
    var share_title = '',share_desc = '',share_link = '',share_imgUrl = '';
    </script>
    <script src="{webroot:webapp/build/lib/framework7.min.js}"></script>
    {if:ICookie::get('env')=='we'}<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>{/if}
    <script type="text/javascript" src="{theme:javascript/jquery.min.js}"></script>
    <script type="text/javascript" src="{theme:javascript/ajaxfileupload.js}"></script>
    <script type="text/javascript" src="{theme:javascript/mobiscroll.core.js}"></script>
    <script type="text/javascript" src="{theme:javascript/mobiscroll.frame.js}"></script>
    <script type="text/javascript" src="{theme:javascript/mobiscroll.scroller.js}"></script>
    <script type="text/javascript" src="{theme:javascript/mobiscroll.util.datetime.js}"></script>
    <script type="text/javascript" src="{theme:javascript/mobiscroll.datetimebase.js}"></script>
    <script type="text/javascript" src="{theme:javascript/mobiscroll.datetime.js}"></script>
    <script type="text/javascript" src="{theme:javascript/mobiscroll.i18n.zh.js}"></script>
    <script type="text/javascript" src="{theme:javascript/clipboard.min.js}"></script>

    <!-- Path to your app js-->
    <script type="text/javascript" src="{webroot:webapp/build/js/app.js}?r=<?php echo time();?>"></script>
	<script type='text/javascript'>
	    //app
	    {set:$env = ICookie::get("env")}
	    {set:$sys = ICookie::get("sys")}
	    var env = '{$env}';
	    var sys = '{$sys}';
	    function closeInitMask()
	    {
	        if ( env == 'app' ) {
	            if ( sys == 'ios' ) {	            	
	                window.webkit.messageHandlers.closeWaitingPage.postMessage('');
	            } else if ( sys == 'android' ) {
	                window.android.close_dialog();
	            }
	        }
	    }
	    function callAppLogin()
        {
            if ( env == 'app' ) {
                if ( sys == 'ios' ) {
                    window.webkit.messageHandlers.goToLogin.postMessage();
                } else if ( sys == 'android' ) {
                	window.android.login();
                }
            }
        }
    
	    //美恰插件
	    (function(m, ei, q, i, a, j, s) {
	        m[i] = m[i] || function() {
	            (m[i].a = m[i].a || []).push(arguments)
	        };
	        j = ei.createElement(q),
	            s = ei.getElementsByTagName(q)[0];
	        j.async = true;
	        j.charset = 'UTF-8';
	        j.src = '//static.meiqia.com/dist/meiqia.js';
	        s.parentNode.insertBefore(j, s);
	    })(window, document, 'script', '_MEIQIA');
	    _MEIQIA('entId', 36016);
	    _MEIQIA('withoutBtn');
	    _MEIQIA('init');
	</script>
    <script>
    $(function(){    	
       	{$this->init_page};
       	{if:ICookie::get('env')=='we'}
        wx.config({
            debug: false,
            appId: '{$signPackage["appId"]}',
            timestamp: {$signPackage["timestamp"]},
            nonceStr: '{$signPackage["nonceStr"]}',
            signature: '{$signPackage["signature"]}',
            jsApiList: [
				'onMenuShareTimeline',
				'onMenuShareAppMessage',
				'onMenuShareQQ',
				'onMenuShareWeibo',
				'onMenuShareQZone',
            ]
        });
        wx.ready(function(){
        	wx.onMenuShareTimeline({
                title: share_title, // 分享标题
                link: share_link, // 分享链接
                imgUrl: share_imgUrl, // 分享图标
            });
            wx.onMenuShareAppMessage({
                title: share_title, // 分享标题
                desc: share_desc, // 分享描述
                link: share_link, // 分享链接
                imgUrl: share_imgUrl, // 分享图标
            });
        });
        {/if}
    });
    </script>
</body>
</html>